package com.example.springbootpetstoredemo.Service;

import com.example.springbootpetstoredemo.Mapper.IndexMapper;
import com.example.springbootpetstoredemo.Pojo.IndexInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IndexService {
    @Autowired
    IndexMapper indexMapper;

    public IndexInfo getIndexInfo(){return indexMapper.getIndexInfo();}

    public void updateIndexStoreCard(String newName,String newInfo,String new_description,String oldName){indexMapper.updateIndexStoreCard(newName,newInfo,new_description,oldName);}

    public void updateIndexStoreInformation(String managerInfo,String locationInfo, String phoneInfo, String emailInfo, String validateInfo,String storeName){
        indexMapper.updateIndexStoreInformation(managerInfo,locationInfo,phoneInfo,emailInfo,validateInfo,storeName);
    }
}
